#!/bin/bash
echo 1 > /proc/sys/net/ipv4/tcp_tw_recycle
echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse
ulimit -c unlimited

mount -t tmpfs tmpfs /etc/mailc -o size=128M
chmod 755 /etc/mailc
cp -a /etc/mailc_bak/* /etc/mailc
cd /etc/mailc
./testd
./testd 110
./server 1234

mount -t tmpfs tmpfs /var/www -o size=1200M
chmod 755 /var/www/
cp -a /var/www_bak/1000normal/  /var/www/
cp -a /var/www_bak/1000best/  	/var/www/
cp -a /var/www_bak/http_1013_new /var/www
cp -a /var/www_bak/1000new/    /var/www/
mkdir /var/www/1000nocache
cd /var/www/1000new
for s in *;do ln $s /var/www/1000nocache/?$s;done

cd /var/www
ln -s /var/spool/apt-mirror/mirror/archive.ubuntu.com/ubuntu/ ubuntu
ln -s /var/spool/apt-mirror/mirror/ftp.us.debian.org/debian/ debian
ln -s /var/spool/apt-mirror/mirror/security.debian.org/debian-security/ debian-security

/etc/init.d/lighttpd restart
/etc/init.d/vsftpd restart
